<template>
  <div class="regionalAgencyCenterStore">
    <c-title :hide="false" :text="'区域门店列表'"></c-title>
    <div class="list">
      <div class="lis" v-for="(item, index) in infoData" :key="index" @click="toStore(item.id)">
        <div class="top">
          <div class="top_l">
            <img :src="item.change_thumb" alt="" />
          </div>
          <div class="top_r">
            <div class="top_r_t">
              {{ item.store_name }}<span style="margin-left: 1rem;">店长：{{ item.nickname }}</span>
            </div>
            <div class="top_r_b">
              <div class="top_r_b_address"><i class="iconfont icon-dizhi1"></i>{{ item.full_address }}</div>
              <i class="iconfont icon-icon_more1"></i>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      infoData: []
    };
  },
  activated() {
    this.getData();
  },
  methods: {
    toStore(id){
      this.$router.push(this.fun.getUrl("HomeSeller", { store_id: id, fromHome: 1 }));
    },
    async getData() {
      let { data, msg, result } = await $http.post("plugin.area-dividend.api.area-dividend.get-store", {}, "");
      if (result) {
        this.infoData = data;
      } else {
        this.$toast(msg);
      }
    }
  }
};
</script>
<style lang="scss" scoped>
.list {
  margin: 0.75rem;
  overflow: hidden;
  .lis {
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 0.63rem;
    margin-bottom: 0.63rem;
    .bottom {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 0.81rem;
      margin-top: 0.75rem;
      border-top: 1px solid #f0f0f1;
      .bottom_l {
        flex: 1;
        font-weight: 500;
        font-size: 0.88rem;
        text-align: left;
      }
    }
    .top {
      display: flex;
      justify-content: space-between;
      .top_l {
        width: 3rem;
        height: 3rem;
        margin-right: 0.63rem;
        img {
          width: 3rem;
          height: 3rem;
          background: #ececec;
          border-radius: 0.5rem;
        }
      }
      .top_r {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        justify-content: center;
        overflow: hidden;
        .top_r_t {
          font-weight: bold;
          font-size: 0.94rem;
          text-align: left;
        }
        .top_r_b {
          display: flex;
          color: #6e6e79;
          margin-top: 0.41rem;
          flex: 1;
          width: 100%;
          display: flex;
          justify-content: space-between;
          align-items: center;
          overflow: hidden;
          .top_r_b_address {
            font-size: 0.81rem;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            color: #6e6e79;

            .icon-dizhi1 {
              font-size: 0.8rem;
              color: #6e6e79;
            }
          }
          .icon-icon_more1 {
            font-size: 0.7rem;
            color: #aaaab3;
            flex-shrink: 0;
          }
        }
      }
    }
  }
}
</style>
